package com.maker.ai.service;

import com.maker.ai.entity.Rag;
import com.maker.ai.mapper.RagMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RagService {
    @Resource
    public RagMapper ragMapper;

    public String insert(Rag rag) {
        ragMapper.insert(rag);
        return "添加成功";
    }
    public Rag findById(String id) {
        return ragMapper.findById(id);
    }

    public List<Rag> getAllRags() {
        return ragMapper.getAllRags();
    }

    public void deleteById(String id) {
        ragMapper.deleteById(id);
    }

    public void update(Rag rag) {
        ragMapper.update(rag);
    }
}
